/* eslint-disable react/prop-types */
function Pagination(props) {
  return ( <div>
    <button onClick={()=>props.onChange(props.current-1)}>上一页</button>
    <span>{props.current}</span>
    <button  onClick={()=>props.onChange(props.current+1)}>下一页</button>
  </div> );
}

export default Pagination;

Pagination.defaultProps={
  current:1,//当前页
}